Skip to content

Fix #984: Refresh view after TTD coverage analysis completes#986

Merged
xusheng6 merged 3 commits intodevfrom
fix/ttd-coverage-auto-refresh
Jan 27, 2026
Merged

Fix #984: Refresh view after TTD coverage analysis completes#986
xusheng6 merged 3 commits intodevfrom
fix/ttd-coverage-auto-refresh

Conversation

@xusheng6
Copy link
Copy Markdown
Member

Summary

Fixes #984 by automatically refreshing the view after TTD coverage analysis completes or results are loaded from cache.

Changes

  • Updated TTDAnalysisDialog constructor to accept and store UIContext* for proper view access
  • Added refreshViewAndEnableRenderLayer() method that:
    • Calls UIContext::refreshCurrentViewContents() to trigger view refresh
    • Verifies the TTD Coverage render layer is registered
  • Called refresh method after:
    • Analysis completes successfully
    • Results are loaded from cache
  • Updated call site in ui.cpp to pass the UIContext from UIActionContext

Behavior

After coverage analysis completes or is loaded, the view will automatically refresh to display the coverage highlights (assuming the user has the "TTD Coverage" render layer enabled in View menu).

Test Plan

  • Run TTD coverage analysis and verify view refreshes automatically
  • Load coverage results from cache and verify view refreshes
  • Verify coverage highlights are visible when render layer is enabled

🤖 Generated with Claude Code

xusheng6 and others added 3 commits January 26, 2026 17:07
- Pass UIContext to TTDAnalysisDialog for proper view access
- Add refreshViewAndEnableRenderLayer() method to refresh view
- Call refresh after analysis completes and after loading results
- Verify TTD Coverage render layer is registered

This makes coverage highlights visible immediately after analysis,
assuming the user has the TTD Coverage render layer enabled.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Change render layer registration to AlwaysEnabled instead of DisabledByDefault
- Add early return check: if GetExecutedInstructionCount() == 0, return immediately
- This makes the layer have zero overhead when there's no coverage data
- Simplify refreshViewAndEnableRenderLayer() method

With these changes:
- Users don't need to manually enable the render layer
- Coverage is visible immediately after analysis completes
- No performance impact when coverage data is not loaded
- Works across all views (linear, graph, etc.)

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@xusheng6 xusheng6 merged commit 75fc20f into dev Jan 27, 2026
1 check passed
@xusheng6 xusheng6 deleted the fix/ttd-coverage-auto-refresh branch January 27, 2026 05:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The TTD coverage analysis dialog should refresh the view so that the coverage becomes visible immediately

1 participant